package com.example.wuqiu.module.sys.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.wuqiu.module.sys.entity.SysOrgan;
import com.example.wuqiu.module.sys.entity.SysUser;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author RedStar
 * @since 2023-02-05
 */
public interface SysOrganService extends IService<SysOrgan> {

    LambdaQueryWrapper<SysOrgan> createQueryWrapper(SysOrgan param);

    List<SysOrgan> getTreeAll(SysUser loginUser);

    List<SysOrgan> getTreeAllAndUser(SysUser loginUser);


    /**
     * 查询组织最顶层组织的ID
     * @param idList 子组织ID
     * */
    public List<String> getTopIds(List<String> idList);
    /**
     * 查询组织下的所有组织ID，返回包括此组织
     * @param idList 组织ID
     * */
    public List<String> getTopIdChilds(List<String> idList);

    List<String> getIdChilds(List<String> idList);
}
